/* ==================================================================   
 * Created [2009-4-27 下午11:32:55] by Jon.King 
 * ==================================================================  
 * TSS 
 * ================================================================== 
 * mailTo:jinpujun@hotmail.com
 * Copyright (c) Jon.King, 2009-2012 
 * ================================================================== 
*/

package com.jinhe.tss.cms.workflow;

/** 
 * <p> WorkFlowNode.java </p> 
 * 工作流节点(步骤)
 */
public class WorkFlowNode {
    
	private String  name;              // 工作流节点名称
	private Integer status;            // 工作流节点状态值
	private WorkerFlowButton previewButton;  // 上一工作流节点按钮
	private WorkerFlowButton nextButton;     // 下一工作流节点按钮
	
    public WorkFlowNode() {
    }
    
    public WorkFlowNode(Integer status, String name){
        this.status = status;
        this.name = name;
    }
    
    public String toString() {
        return "name: " + name + ", status: " + status
            + ", previewButton: (" + previewButton + ")"
            + ", nextButton: (" + nextButton + ")";
    }
    
    public WorkFlowNode(String status, String name){
        this(Integer.valueOf(status), name);
    }

	public WorkerFlowButton getNextButton() {
		return nextButton;
	}

	public void setNextButton(WorkerFlowButton next) {
		this.nextButton = next;
	}

	public WorkerFlowButton getPreviewButton() {
		return previewButton;
	}

	public void setPreviewButton(WorkerFlowButton preview) {
		this.previewButton = preview;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
	/** 
	 * 工作流节点按钮
	 */
	public static class WorkerFlowButton {
		
		private Integer status; // 工作流节点状态值
		private String  button; // 按钮名称
	 
		public WorkerFlowButton(Integer status, String  button){
	        this.status = status;
	        this.button = button;
	    }
	    
	    public WorkerFlowButton(String status, String  button){
	        this(Integer.valueOf(status), button);
	    }

		public String getButton() {
			return button;
		}
	 
		public Integer getStatus() {
			return status;
		}
		
		public String toString() {
	        return "button: " + button + ", status: " + status;
	    }
	}
}

